package com.zeny.express.framework.mq;

import java.util.Date;

public class Man {
	private String name;
	private int age;
	private Date birthDate;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public boolean equals(Man otherMan) {
		if (otherMan == null) {
			return false;
		}

		if (this.getName() != null) {
			if (!this.getName().equals(otherMan.getName())) {
				return false;
			}
		} else {
			if (otherMan.getName() != null) {
				return false;
			}
		}

		if (this.getAge() != otherMan.getAge()) {
			return false;
		}

//		if (this.getBirthDate().getTime() != otherMan.getBirthDate().getTime()) {
//			return false;
//		}

		return true;
	}
}
